import message from "./message.js";
const pay = {
	exePay: function(param) {
		return new Promise((resolve, reject) => {
			uni.requestPayment({
			    "provider": "wxpay", 
				timeStamp: param.timeStamp,
				nonceStr: param.nonceStr,
				package: param.packageVal,
				signType: param.signType,
				paySign: param.paySign,
			    success(res) {
					message.info("支付成功");
					resolve(res);
				},
			    fail(e) {
					message.info("支付失败");
				}
			});
		});
	}
};

export default pay;